package com.subject.shuati.application.covert;

import com.subject.shuati.application.dto.SubjectAnswerDto;
import com.subject.shuati.domain.entity.SubjectAnswerBo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * BO与Dto之间的转换
 */
@Mapper
public interface SubjectAnswerDtoConverter {

    SubjectAnswerDtoConverter INSTANCE = Mappers.getMapper(SubjectAnswerDtoConverter.class);

    /**
     * dto转bo
     * @param subjectAnswerDto
     * @return
     */
    SubjectAnswerBo DtoConverterAnswerBo(SubjectAnswerDto subjectAnswerDto);

    /**
     * BoList转DtoList
     * @param subjectAnswerDtoList
     * @return
     */
    List<SubjectAnswerBo> DtoConverterAnswerBoList(List<SubjectAnswerDto> subjectAnswerDtoList);
}
